table = new tree.ui.Table
store = new tree.ui.Store({ name: tree.ui.TYPES.string })

lview = new tree.ui.TreeView
lview.set_data({ a: null, b: { abc: { cde: null } } } )
lview.set_width 70

store2 = new tree.ui.Store({ name: tree.ui.TYPES.string })

lview2 = new tree.ui.Listview store2

proxy = new tree.io.rpc.JSON_Proxy '/rpc'
plugins = proxy.call_method 'list_bundles', []

for plugin in plugins
    store2.append [plugin]

hbox = new tree.ui.HBox
new_button = new tree.ui.Button 'New'
hbox.addnew_button

open_button = new tree.ui.Button 'Open'
hbox.add open_button

save_button = new tree.ui.Button 'Save' 
hbox.add save_button

save_all_button = new tree.ui.Button 'Save All'
hbox.add save_all_button

hbox.set_style 'width', 'auto'
hbox.set_style 'height', 'auto'

table.add hbox, 0, 0, 3, 1
###
args = {
  value: "function myScript()\n{\n  return 100\n}\n",
  mode:  "javascript",
  lineNumbers: true
}
###
view = new tree.ui.TextView
table.add view, 1, 1

view.set_style 'width', '800px'

table.add lview, 0, 1

table.add lview2, 2, 1

messages = new tree.ui.TextView
table.add messages, 0, 2, 3, 1

messages.set_style 'overflow-y', 'scroll'

document.body.appendChild(table.show())
